package com.sfh.gd.controller;

import cn.dev33.satoken.util.SaResult;
import com.sfh.gd.domain.dto.SysLoginDTO;
import com.sfh.gd.service.SysService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;


/***
 * 系统（控制层只做输入接收，不写判断逻辑）
 */
@RestController
@RequestMapping("/pc/sys")
@RequiredArgsConstructor
public class WebSysController {

    private final SysService sysService;

    /**
     * 系统账号登录
     * @param req
     * @return
     */
    @PostMapping("login")
    public SaResult login(@Validated @RequestBody SysLoginDTO req){
        return sysService.login(req);
    }


}
